//package com.ld.security.common.mybatis.config;
//
//import com.alibaba.druid.support.spring.stat.DruidStatInterceptor;
//import org.springframework.aop.Advisor;
//import org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor;
//import org.springframework.aop.support.JdkRegexpMethodPointcut;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Scope;
//
//@Configuration
//public class DruidSpringConfiguration {
//
//
//
//    @Bean
//    public DruidStatInterceptor druidStatInterceptor() {
//        return new DruidStatInterceptor();
//    }
//
//    @Bean
//    @Scope("prototype")
//    public JdkRegexpMethodPointcut druidStatPointcut() {
//        JdkRegexpMethodPointcut jdkRegexpMethodPointcut = new JdkRegexpMethodPointcut();
//        //指明需要监控的类
//        jdkRegexpMethodPointcut.setPatterns("com.ld.security.*.modules.*.service.*");
//        return jdkRegexpMethodPointcut;
//    }
//
//    @Bean
//    public Advisor druidAdviceAdvisor() {
//        DefaultBeanFactoryPointcutAdvisor defaultBeanFactoryPointcutAdvisor = new DefaultBeanFactoryPointcutAdvisor();
//        defaultBeanFactoryPointcutAdvisor.setAdvice(druidStatInterceptor());
//        defaultBeanFactoryPointcutAdvisor.setPointcut(druidStatPointcut());
//        return defaultBeanFactoryPointcutAdvisor;
//    }
//
//}